import threading
from time import sleep, time


def get_url_detail(url):
    print('this is start get get_url_detail !')
    sleep(1)
    print('this is end get get_url_detail !')


def get_content_url(url):
    print('this is start get get_content_url !')
    sleep(4)
    print('this is end get get_content_url !')


if __name__ == '__main__':
    start_time = time()
    print('this is the main Thread start At:[{}]'.format(start_time))
    t1 = threading.Thread(target=get_url_detail, args=('http://www.baidu.com',))
    t2 = threading.Thread(target=get_content_url, args=('http://www.baidu.c|om',))
    # t1.setDaemon(True)
    # t2.setDaemon(True)
    t1.start()
    t2.start()
    t1.join()
    t2.join()
    print('this is the main thread is end At:[{}]'.format(time()-start_time))